import request from '@/utils/request'

// 查询计算器列表
export function listCalculator(query) {
  return request({
    url: '/calculator/calculator/list',
    method: 'get',
    params: query
  })
}

// 查询计算器详细
export function getCalculator(id) {
  return request({
    url: '/calculator/calculator/' + id,
    method: 'get'
  })
}

// 新增计算器
export function addCalculator(data) {
  return request({
    url: '/calculator/calculator',
    method: 'post',
    data: data
  })
}

// 修改计算器
export function updateCalculator(data) {
  return request({
    url: '/calculator/calculator',
    method: 'put',
    data: data
  })
}

// 删除计算器
export function delCalculator(id) {
  return request({
    url: '/calculator/calculator/' + id,
    method: 'delete'
  })
}
